import request from '@/utils/request'

// 查询工作流实例列表
export function listInstance(query) {
  return request({
    url: '/labdata/instance/list',
    method: 'get',
    params: query
  })
}
export function finsiedList(query) {
  return request({
    url: '/labdata/instance/finsiedList',
    method: 'get',
    params: query
  })
}
export function commitedList(query) {
  return request({
    url: '/labdata/instance/commitedList',
    method: 'get',
    params: query
  })
}
export function myList(query) {
  return request({
    url: '/labdata/instance/myList',
    method: 'get',
    params: query
  })
}
export function copyToList(query) {
  return request({
    url: '/labdata/instance/copyToList',
    method: 'get',
    params: query
  })
}
// 查询工作流实例详细
export function getInstance(instanceId) {
  return request({
    url: '/labdata/instance/' + instanceId,
    method: 'get'
  })
}

// 新增工作流实例
export function addInstance(data) {
  return request({
    url: '/labdata/instance',
    method: 'post',
    data: data
  })
}

// 修改工作流实例
export function updateInstance(data) {
  return request({
    url: '/labdata/instance',
    method: 'put',
    data: data
  })
}

// 删除工作流实例
export function delInstance(instanceId) {
  return request({
    url: '/labdata/instance/' + instanceId,
    method: 'delete'
  })
}

// 导出工作流实例
export function exportInstance(query) {
  return request({
    url: '/labdata/instance/export',
    method: 'get',
    params: query
  })
}